package com.his.controller;

import com.his.pojo.Disease;
import com.his.service.DiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DiseaseController {

    //注入service
    @Autowired
    private DiseaseService diseaseService;

    /*处理加载疾病列表请求*/
    @CrossOrigin
    @GetMapping("/queryDiseaseList")
    public List<Disease> queryDiseaseList(){
        return diseaseService.list();
    }
}
